﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Com.Rivyer.Web.issue
{
    public partial class addissue : System.Web.UI.Page
    {

        private readonly BLL.userissuesBll issuesbll = new BLL.userissuesBll();
        protected void Page_Load(object sender, EventArgs e)
        {
            ASPxLabel2.Text = DateTime.Now.Date.ToShortDateString();
            ASPxLabel6.Text = Session["username"].ToString();
        }

        protected void ASPxButton1_Click(object sender, EventArgs e)
        {
            Model.userissuesModel issuesmodel = new Model.userissuesModel();
            issuesmodel.adminaply = " ";
            issuesmodel.createdate = DateTime.Now.Date;
            issuesmodel.issuedescription = ASPxMemo1.Text.Trim();
            issuesmodel.issuetype = ASPxRadioButtonList1.SelectedItem.Value.ToString();
            issuesmodel.modifydate = DateTime.Now;
            issuesmodel.username = Session["username"].ToString();
            issuesmodel.status = "已提交,待解决";
            {
                new BLL.useroperatelogBll().AddLog(Session["username"].ToString(),"提交",string.Format("一个{0}",issuesmodel.issuetype));
                issuesbll.Add(issuesmodel);
                Maticsoft.Common.MessageBox.Show(this, "问题已经成功添加,非常感谢您的支持与帮助!");
            }
            
        }
    }
}